package com.htudata.user.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.htudata.user.dao.UserDao;
import com.htudata.user.pojo.po.User;
import com.htudata.user.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl implements UserService {

  @Autowired
  private UserDao userDao;
  
  public JSONObject getUserInfo(long userId) {
    User user = this.userDao.selectUserByUserId(userId);
    JSONObject usreInfoJson = JSONObject.parseObject(JSONObject.toJSON(user).toString());
    return usreInfoJson;
  }
}
